<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>OpenShoe: scif_uc3c.h Source File</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">OpenShoe
   &#160;<span id="projectnumber">0.1</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
<div class="header">
  <div class="headertitle">
<div class="title">scif_uc3c.h</div>  </div>
</div>
<div class="contents">
<a href="scif__uc3c_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*This file has been prepared for Doxygen automatic documentation generation.*/</span>
<a name="l00016"></a>00016 <span class="comment">/* Copyright (c) 2009 Atmel Corporation. All rights reserved.</span>
<a name="l00017"></a>00017 <span class="comment"> *</span>
<a name="l00018"></a>00018 <span class="comment"> * Redistribution and use in source and binary forms, with or without</span>
<a name="l00019"></a>00019 <span class="comment"> * modification, are permitted provided that the following conditions are met:</span>
<a name="l00020"></a>00020 <span class="comment"> *</span>
<a name="l00021"></a>00021 <span class="comment"> * 1. Redistributions of source code must retain the above copyright notice, this</span>
<a name="l00022"></a>00022 <span class="comment"> * list of conditions and the following disclaimer.</span>
<a name="l00023"></a>00023 <span class="comment"> *</span>
<a name="l00024"></a>00024 <span class="comment"> * 2. Redistributions in binary form must reproduce the above copyright notice,</span>
<a name="l00025"></a>00025 <span class="comment"> * this list of conditions and the following disclaimer in the documentation</span>
<a name="l00026"></a>00026 <span class="comment"> * and/or other materials provided with the distribution.</span>
<a name="l00027"></a>00027 <span class="comment"> *</span>
<a name="l00028"></a>00028 <span class="comment"> * 3. The name of Atmel may not be used to endorse or promote products derived</span>
<a name="l00029"></a>00029 <span class="comment"> * from this software without specific prior written permission.</span>
<a name="l00030"></a>00030 <span class="comment"> *</span>
<a name="l00031"></a>00031 <span class="comment"> * 4. This software may only be redistributed and used in connection with an Atmel</span>
<a name="l00032"></a>00032 <span class="comment"> * AVR product.</span>
<a name="l00033"></a>00033 <span class="comment"> *</span>
<a name="l00034"></a>00034 <span class="comment"> * THIS SOFTWARE IS PROVIDED BY ATMEL &quot;AS IS&quot; AND ANY EXPRESS OR IMPLIED</span>
<a name="l00035"></a>00035 <span class="comment"> * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF</span>
<a name="l00036"></a>00036 <span class="comment"> * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE</span>
<a name="l00037"></a>00037 <span class="comment"> * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR</span>
<a name="l00038"></a>00038 <span class="comment"> * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES</span>
<a name="l00039"></a>00039 <span class="comment"> * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;</span>
<a name="l00040"></a>00040 <span class="comment"> * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND</span>
<a name="l00041"></a>00041 <span class="comment"> * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT</span>
<a name="l00042"></a>00042 <span class="comment"> * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS</span>
<a name="l00043"></a>00043 <span class="comment"> * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE</span>
<a name="l00044"></a>00044 <span class="comment"> *</span>
<a name="l00045"></a>00045 <span class="comment"> */</span>
<a name="l00046"></a>00046 <span class="preprocessor">#ifndef _SCIF_UC3C_H_</span>
<a name="l00047"></a>00047 <span class="preprocessor"></span><span class="preprocessor">#define _SCIF_UC3C_H_</span>
<a name="l00048"></a>00048 <span class="preprocessor"></span>
<a name="l00049"></a>00049 <span class="preprocessor">#ifdef __cplusplus</span>
<a name="l00050"></a>00050 <span class="preprocessor"></span><span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> {
<a name="l00051"></a>00051 <span class="preprocessor">#endif</span>
<a name="l00052"></a>00052 <span class="preprocessor"></span>
<a name="l00053"></a>00053 <span class="preprocessor">#include &quot;<a class="code" href="compiler_8h.html" title="Compiler file for AVR32.">compiler.h</a>&quot;</span>
<a name="l00054"></a>00054 
<a name="l00055"></a>00055 
<a name="l00056"></a>00056 <span class="comment">//  These defines are missing from or wrong in the toolchain header file ip_xxx.h or part.h</span>
<a name="l00057"></a>00057 <span class="preprocessor">#ifdef AVR32_SCIF_101_H_INCLUDED</span>
<a name="l00058"></a>00058 <span class="preprocessor"></span><span class="preprocessor">#define AVR32_SCIF_OSCCTRL0_STARTUP_0_RCOSC                 0x00000000</span>
<a name="l00059"></a>00059 <span class="preprocessor"></span><span class="preprocessor">#define AVR32_SCIF_OSCCTRL0_STARTUP_128_RCOSC               0x00000002</span>
<a name="l00060"></a>00060 <span class="preprocessor"></span><span class="preprocessor">#define AVR32_SCIF_OSCCTRL0_STARTUP_16384_RCOSC             0x00000006</span>
<a name="l00061"></a>00061 <span class="preprocessor"></span><span class="preprocessor">#define AVR32_SCIF_OSCCTRL0_STARTUP_2048_RCOSC              0x00000003</span>
<a name="l00062"></a>00062 <span class="preprocessor"></span><span class="preprocessor">#define AVR32_SCIF_OSCCTRL0_STARTUP_4096_RCOSC              0x00000004</span>
<a name="l00063"></a>00063 <span class="preprocessor"></span><span class="preprocessor">#define AVR32_SCIF_OSCCTRL0_STARTUP_64_RCOSC                0x00000001</span>
<a name="l00064"></a>00064 <span class="preprocessor"></span><span class="preprocessor">#define AVR32_SCIF_OSCCTRL0_STARTUP_8192_RCOSC              0x00000005</span>
<a name="l00065"></a>00065 <span class="preprocessor"></span><span class="preprocessor">#define AVR32_SCIF_OSCCTRL1_STARTUP_0_RCOSC                 0x00000000</span>
<a name="l00066"></a>00066 <span class="preprocessor"></span><span class="preprocessor">#define AVR32_SCIF_OSCCTRL1_STARTUP_128_RCOSC               0x00000002</span>
<a name="l00067"></a>00067 <span class="preprocessor"></span><span class="preprocessor">#define AVR32_SCIF_OSCCTRL1_STARTUP_16384_RCOSC             0x00000006</span>
<a name="l00068"></a>00068 <span class="preprocessor"></span><span class="preprocessor">#define AVR32_SCIF_OSCCTRL1_STARTUP_2048_RCOSC              0x00000003</span>
<a name="l00069"></a>00069 <span class="preprocessor"></span><span class="preprocessor">#define AVR32_SCIF_OSCCTRL1_STARTUP_4096_RCOSC              0x00000004</span>
<a name="l00070"></a>00070 <span class="preprocessor"></span><span class="preprocessor">#define AVR32_SCIF_OSCCTRL1_STARTUP_64_RCOSC                0x00000001</span>
<a name="l00071"></a>00071 <span class="preprocessor"></span><span class="preprocessor">#define AVR32_SCIF_OSCCTRL1_STARTUP_8192_RCOSC              0x00000005</span>
<a name="l00072"></a>00072 <span class="preprocessor"></span><span class="preprocessor">#define AVR32_SCIF_OSCCTRL32_STARTUP_0_RCOSC                0x00000000</span>
<a name="l00073"></a>00073 <span class="preprocessor"></span><span class="preprocessor">#define AVR32_SCIF_OSCCTRL32_STARTUP_128_RCOSC              0x00000001</span>
<a name="l00074"></a>00074 <span class="preprocessor"></span><span class="preprocessor">#define AVR32_SCIF_OSCCTRL32_STARTUP_131072_RCOSC           0x00000005</span>
<a name="l00075"></a>00075 <span class="preprocessor"></span><span class="preprocessor">#define AVR32_SCIF_OSCCTRL32_STARTUP_16384_RCOSC            0x00000003</span>
<a name="l00076"></a>00076 <span class="preprocessor"></span><span class="preprocessor">#define AVR32_SCIF_OSCCTRL32_STARTUP_262144_RCOSC           0x00000006</span>
<a name="l00077"></a>00077 <span class="preprocessor"></span><span class="preprocessor">#define AVR32_SCIF_OSCCTRL32_STARTUP_524288_RCOSC           0x00000007</span>
<a name="l00078"></a>00078 <span class="preprocessor"></span><span class="preprocessor">#define AVR32_SCIF_OSCCTRL32_STARTUP_65536_RCOSC            0x00000004</span>
<a name="l00079"></a>00079 <span class="preprocessor"></span><span class="preprocessor">#define AVR32_SCIF_OSCCTRL32_STARTUP_8192_RCOSC             0x00000002</span>
<a name="l00080"></a>00080 <span class="preprocessor"></span><span class="preprocessor">#define AVR32_SCIF_OSCCTRL0_MODE_CRYSTAL                    0x00000001</span>
<a name="l00081"></a>00081 <span class="preprocessor"></span><span class="preprocessor">#define AVR32_SCIF_OSCCTRL0_MODE_EXTCLK                     0x00000000</span>
<a name="l00082"></a>00082 <span class="preprocessor"></span><span class="preprocessor">#define AVR32_SCIF_OSCCTRL0_GAIN_G0                         0x00000000</span>
<a name="l00083"></a>00083 <span class="preprocessor"></span><span class="preprocessor">#define AVR32_SCIF_OSCCTRL0_GAIN_G1                         0x00000001</span>
<a name="l00084"></a>00084 <span class="preprocessor"></span><span class="preprocessor">#define AVR32_SCIF_OSCCTRL0_GAIN_G2                         0x00000002</span>
<a name="l00085"></a>00085 <span class="preprocessor"></span><span class="preprocessor">#define AVR32_SCIF_OSCCTRL0_GAIN_G3                         0x00000003</span>
<a name="l00086"></a>00086 <span class="preprocessor"></span><span class="preprocessor">#define AVR32_SCIF_OSCCTRL1_GAIN_G0                         0x00000000</span>
<a name="l00087"></a>00087 <span class="preprocessor"></span><span class="preprocessor">#define AVR32_SCIF_OSCCTRL1_GAIN_G1                         0x00000001</span>
<a name="l00088"></a>00088 <span class="preprocessor"></span><span class="preprocessor">#define AVR32_SCIF_OSCCTRL1_GAIN_G2                         0x00000002</span>
<a name="l00089"></a>00089 <span class="preprocessor"></span><span class="preprocessor">#define AVR32_SCIF_OSCCTRL1_GAIN_G3                         0x00000003</span>
<a name="l00090"></a>00090 <span class="preprocessor"></span><span class="preprocessor">#define AVR32_SCIF_UNLOCK_KEY_VALUE                         0x000000AA</span>
<a name="l00091"></a>00091 <span class="preprocessor"></span><span class="preprocessor">#define AVR32_SCIF_OSCCTRL_OSCEN_ENABLE                     0x00000001  </span>
<a name="l00092"></a>00092 <span class="preprocessor"></span><span class="preprocessor">#define AVR32_SCIF_OSCCTRL_OSCEN_DISABLE                    0x00000000  </span>
<a name="l00093"></a>00093 <span class="preprocessor"></span><span class="preprocessor">#define AVR32_SCIF_OSCCTRL32_OSC32EN_ENABLE                 0x00000001  </span>
<a name="l00094"></a>00094 <span class="preprocessor"></span><span class="preprocessor">#define AVR32_SCIF_OSCCTRL32_OSC32EN_DISABLE                0x00000000  </span>
<a name="l00095"></a>00095 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00096"></a>00096 <span class="preprocessor"></span>
<a name="l00097"></a>00097 
<a name="l00099"></a>00099 
<a name="l00101"></a><a class="code" href="scif__uc3c_8h.html#a6ec08d0cd02a6104e0f98f22b94d0fb4">00101</a> <span class="preprocessor">#define SCIF_EXT_CRYSTAL_MIN_FREQ_HZ  4000000</span>
<a name="l00102"></a>00102 <span class="preprocessor"></span>
<a name="l00103"></a><a class="code" href="scif__uc3c_8h.html#a00368dbc88219075cb01d352b2725c82">00103</a> <span class="preprocessor">#define SCIF_EXT_CRYSTAL_MAX_FREQ_HZ  20000000</span>
<a name="l00104"></a>00104 <span class="preprocessor"></span>
<a name="l00106"></a><a class="code" href="scif__uc3c_8h.html#a2a2e11f06784f5133dd912e595fde6f0">00106</a> <span class="keyword">typedef</span> <span class="keyword">enum</span>
<a name="l00107"></a>00107 {
<a name="l00108"></a><a class="code" href="scif__uc3c_8h.html#a2a2e11f06784f5133dd912e595fde6f0a43e5e892e6ff3d8eda9ecc018c01bea3">00108</a>   <a class="code" href="scif__uc3c_8h.html#a2a2e11f06784f5133dd912e595fde6f0a43e5e892e6ff3d8eda9ecc018c01bea3">SCIF_GCCTRL_SLOWCLOCK</a>  = AVR32_SCIF_GC_USES_CLK_SLOW,
<a name="l00109"></a><a class="code" href="scif__uc3c_8h.html#a2a2e11f06784f5133dd912e595fde6f0ac088ce669da91221d941efed215feaad">00109</a>   <a class="code" href="scif__uc3c_8h.html#a2a2e11f06784f5133dd912e595fde6f0ac088ce669da91221d941efed215feaad">SCIF_GCCTRL_OSC32K</a>  = AVR32_SCIF_GC_USES_CLK_32,
<a name="l00110"></a><a class="code" href="scif__uc3c_8h.html#a2a2e11f06784f5133dd912e595fde6f0a20a5bfe0f8be03f80ca1cd79b8f4729f">00110</a>   <a class="code" href="scif__uc3c_8h.html#a2a2e11f06784f5133dd912e595fde6f0a20a5bfe0f8be03f80ca1cd79b8f4729f">SCIF_GCCTRL_OSC0</a>  = AVR32_SCIF_GC_USES_OSC0,
<a name="l00111"></a><a class="code" href="scif__uc3c_8h.html#a2a2e11f06784f5133dd912e595fde6f0a4a2a1cac2ae4273c6a2f45227f82c530">00111</a>   <a class="code" href="scif__uc3c_8h.html#a2a2e11f06784f5133dd912e595fde6f0a4a2a1cac2ae4273c6a2f45227f82c530">SCIF_GCCTRL_OSC1</a>  = AVR32_SCIF_GC_USES_OSC1,  
<a name="l00112"></a><a class="code" href="scif__uc3c_8h.html#a2a2e11f06784f5133dd912e595fde6f0af62c810c63a4f09772877ec072de8ca5">00112</a>   <a class="code" href="scif__uc3c_8h.html#a2a2e11f06784f5133dd912e595fde6f0af62c810c63a4f09772877ec072de8ca5">SCIF_GCCTRL_PLL0</a>  = AVR32_SCIF_GC_USES_PLL0,
<a name="l00113"></a><a class="code" href="scif__uc3c_8h.html#a2a2e11f06784f5133dd912e595fde6f0aec3246839ddf9191be74d5ceab574fa6">00113</a>   <a class="code" href="scif__uc3c_8h.html#a2a2e11f06784f5133dd912e595fde6f0aec3246839ddf9191be74d5ceab574fa6">SCIF_GCCTRL_PLL1</a>  = AVR32_SCIF_GC_USES_PLL1,    
<a name="l00114"></a><a class="code" href="scif__uc3c_8h.html#a2a2e11f06784f5133dd912e595fde6f0a8a5678d41fd2e569b7fa901c50354460">00114</a>   <a class="code" href="scif__uc3c_8h.html#a2a2e11f06784f5133dd912e595fde6f0a8a5678d41fd2e569b7fa901c50354460">SCIF_GCCTRL_RC8M</a>  = AVR32_SCIF_GC_USES_RCOSC8,
<a name="l00115"></a><a class="code" href="scif__uc3c_8h.html#a2a2e11f06784f5133dd912e595fde6f0a5c1a2fd50e4196675e4dcd726e926ef6">00115</a>   <a class="code" href="scif__uc3c_8h.html#a2a2e11f06784f5133dd912e595fde6f0a5c1a2fd50e4196675e4dcd726e926ef6">SCIF_GCCTRL_CPUCLOCK</a>  = AVR32_SCIF_GC_USES_CLK_CPU,
<a name="l00116"></a><a class="code" href="scif__uc3c_8h.html#a2a2e11f06784f5133dd912e595fde6f0a0a4e09084b5a92331c0682b3e58e2c6b">00116</a>   <a class="code" href="scif__uc3c_8h.html#a2a2e11f06784f5133dd912e595fde6f0a0a4e09084b5a92331c0682b3e58e2c6b">SCIF_GCCTRL_HSBCLOCK</a>  = AVR32_SCIF_GC_USES_CLK_HSB,
<a name="l00117"></a><a class="code" href="scif__uc3c_8h.html#a2a2e11f06784f5133dd912e595fde6f0af5fbd96176bafd864ecde5d8df17c7f6">00117</a>   <a class="code" href="scif__uc3c_8h.html#a2a2e11f06784f5133dd912e595fde6f0af5fbd96176bafd864ecde5d8df17c7f6">SCIF_GCCTRL_PBACLOCK</a>  = AVR32_SCIF_GC_USES_CLK_PBA,
<a name="l00118"></a><a class="code" href="scif__uc3c_8h.html#a2a2e11f06784f5133dd912e595fde6f0abf0a044de6699515bef2685fdc6093a1">00118</a>   <a class="code" href="scif__uc3c_8h.html#a2a2e11f06784f5133dd912e595fde6f0abf0a044de6699515bef2685fdc6093a1">SCIF_GCCTRL_PBBCLOCK</a>  = AVR32_SCIF_GC_USES_CLK_PBB,
<a name="l00119"></a><a class="code" href="scif__uc3c_8h.html#a2a2e11f06784f5133dd912e595fde6f0a6c6ccb2e6b36df23583746f07f23c7c4">00119</a>   <a class="code" href="scif__uc3c_8h.html#a2a2e11f06784f5133dd912e595fde6f0a6c6ccb2e6b36df23583746f07f23c7c4">SCIF_GCCTRL_OSCSEL_INVALID</a>
<a name="l00120"></a>00120 } <a class="code" href="scif__uc3c_8h.html#a2a2e11f06784f5133dd912e595fde6f0" title="The different clock source for the generic clocks.">scif_gcctrl_oscsel_t</a>;
<a name="l00121"></a>00121 
<a name="l00122"></a>00122 
<a name="l00123"></a>00123 
<a name="l00125"></a><a class="code" href="scif__uc3c_8h.html#a8758fcbbde760fe3498dd00acf238407">00125</a> <span class="preprocessor">#define SCIF_POLL_TIMEOUT             100000</span>
<a name="l00126"></a>00126 <span class="preprocessor"></span>
<a name="l00128"></a><a class="code" href="scif__uc3c_8h.html#a00f126703767e0cf0e9ba6796e32869a">00128</a> <span class="preprocessor">#define SCIF_NOT_SUPPORTED            (-10000)</span>
<a name="l00129"></a>00129 <span class="preprocessor"></span>
<a name="l00130"></a>00130 
<a name="l00132"></a><a class="code" href="scif__uc3c_8h.html#af09989f8fb441a8d3806b7fe60fdc644">00132</a> <span class="keyword">typedef</span> <span class="keyword">enum</span>
<a name="l00133"></a>00133 {
<a name="l00134"></a><a class="code" href="scif__uc3c_8h.html#af09989f8fb441a8d3806b7fe60fdc644a6cbdcff7051100ba50af09439fbb0122">00134</a>   <a class="code" href="scif__uc3c_8h.html#af09989f8fb441a8d3806b7fe60fdc644a6cbdcff7051100ba50af09439fbb0122">SCIF_OSC0</a>  = 0,
<a name="l00135"></a><a class="code" href="scif__uc3c_8h.html#af09989f8fb441a8d3806b7fe60fdc644a79fa8a5ea1f7726cd4a35c556cf83380">00135</a>   <a class="code" href="scif__uc3c_8h.html#af09989f8fb441a8d3806b7fe60fdc644a79fa8a5ea1f7726cd4a35c556cf83380">SCIF_OSC1</a>  = 1
<a name="l00136"></a>00136 } <a class="code" href="scif__uc3c_8h.html#af09989f8fb441a8d3806b7fe60fdc644" title="The different oscillators.">scif_osc_t</a>;
<a name="l00137"></a>00137 
<a name="l00139"></a><a class="code" href="scif__uc3c_8h.html#aee67e9247cde3191caf3a6ec8cc49131">00139</a> <span class="keyword">typedef</span> <span class="keyword">enum</span>
<a name="l00140"></a>00140 {
<a name="l00141"></a><a class="code" href="scif__uc3c_8h.html#aee67e9247cde3191caf3a6ec8cc49131afb73f3e6fe0f1649f6e70bb74f447536">00141</a>   <a class="code" href="scif__uc3c_8h.html#aee67e9247cde3191caf3a6ec8cc49131afb73f3e6fe0f1649f6e70bb74f447536">SCIF_PLL0</a>  = 0,
<a name="l00142"></a><a class="code" href="scif__uc3c_8h.html#aee67e9247cde3191caf3a6ec8cc49131a1fe4b13fa40ed138fe42446463c1ab6e">00142</a>   <a class="code" href="scif__uc3c_8h.html#aee67e9247cde3191caf3a6ec8cc49131a1fe4b13fa40ed138fe42446463c1ab6e">SCIF_PLL1</a>  = 1
<a name="l00143"></a>00143 } <a class="code" href="scif__uc3c_8h.html#aee67e9247cde3191caf3a6ec8cc49131" title="The different plls.">scif_pll_t</a>;
<a name="l00144"></a>00144 
<a name="l00146"></a><a class="code" href="scif__uc3c_8h.html#a9a708e94c5df197717f5859f6b8b257c">00146</a> <span class="keyword">typedef</span> <span class="keyword">enum</span>
<a name="l00147"></a>00147 {
<a name="l00148"></a><a class="code" href="scif__uc3c_8h.html#a9a708e94c5df197717f5859f6b8b257caab4ef315627644c27b21ace5afcc3aac">00148</a>   <a class="code" href="scif__uc3c_8h.html#a9a708e94c5df197717f5859f6b8b257caab4ef315627644c27b21ace5afcc3aac">SCIF_OSC_MODE_EXT_CLK</a> = 0,            <span class="comment">// For both OSC0 &amp; OSC32</span>
<a name="l00149"></a><a class="code" href="scif__uc3c_8h.html#a9a708e94c5df197717f5859f6b8b257ca3b93142664c5679290dcacf047360aae">00149</a>   <a class="code" href="scif__uc3c_8h.html#a9a708e94c5df197717f5859f6b8b257ca3b93142664c5679290dcacf047360aae">SCIF_OSC_MODE_2PIN_CRYSTAL</a> = 1,       <span class="comment">// For both OSC0 &amp; OSC32</span>
<a name="l00150"></a><a class="code" href="scif__uc3c_8h.html#a9a708e94c5df197717f5859f6b8b257ca5dc91e7de7e69bf2958bb036dd090eee">00150</a>   <a class="code" href="scif__uc3c_8h.html#a9a708e94c5df197717f5859f6b8b257ca5dc91e7de7e69bf2958bb036dd090eee">SCIF_OSC_MODE_2PIN_CRYSTAL_HICUR</a> = 2, <span class="comment">// For OSC32 only</span>
<a name="l00151"></a>00151 } <a class="code" href="scif__uc3c_8h.html#a9a708e94c5df197717f5859f6b8b257c" title="The different oscillator modes.">scif_osc_mode_t</a>;
<a name="l00152"></a>00152 
<a name="l00154"></a><a class="code" href="structscif__osc__opt__t.html">00154</a> <span class="keyword">typedef</span> <span class="keyword">struct</span>
<a name="l00155"></a>00155 {
<a name="l00157"></a><a class="code" href="structscif__osc__opt__t.html#a6a60d571530d7b7eabe0cf5eefe6fe7a">00157</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span>   <a class="code" href="structscif__osc__opt__t.html#a6a60d571530d7b7eabe0cf5eefe6fe7a" title="The input frequency (from the external clock or the crystal).">freq_hz</a>;
<a name="l00159"></a><a class="code" href="structscif__osc__opt__t.html#a1cd9d6f0cb38d71a344fbdab1fe90337">00159</a>   <a class="code" href="scif__uc3c_8h.html#a9a708e94c5df197717f5859f6b8b257c" title="The different oscillator modes.">scif_osc_mode_t</a> <a class="code" href="structscif__osc__opt__t.html#a1cd9d6f0cb38d71a344fbdab1fe90337" title="Set the oscillator mode.">mode</a>;
<a name="l00161"></a><a class="code" href="structscif__osc__opt__t.html#aa056d244d7d751361c02bd7d29c06b69">00161</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>   <a class="code" href="structscif__osc__opt__t.html#aa056d244d7d751361c02bd7d29c06b69" title="Specify the oscillator startup time.">startup</a>;
<a name="l00163"></a><a class="code" href="structscif__osc__opt__t.html#a6642c00d5955b3fb3a2cbd3320977f23">00163</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>   <a class="code" href="structscif__osc__opt__t.html#a6642c00d5955b3fb3a2cbd3320977f23" title="Gain for the oscillator.">gain</a>;
<a name="l00164"></a>00164 } <a class="code" href="structscif__osc__opt__t.html" title="OSC0/OSC1 startup options.">scif_osc_opt_t</a>;
<a name="l00165"></a>00165 
<a name="l00167"></a><a class="code" href="structscif__pll__opt__t.html">00167</a> <span class="keyword">typedef</span> <span class="keyword">struct</span>
<a name="l00168"></a>00168 {
<a name="l00170"></a><a class="code" href="structscif__pll__opt__t.html#ae397f441f9093a691a6e74fa777dd939">00170</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>   <a class="code" href="structscif__pll__opt__t.html#ae397f441f9093a691a6e74fa777dd939" title="Set to 1 for VCO frequency range 80-180MHz, set to 0 for VCO frequency range 160-240Mhz.">pll_freq</a>;
<a name="l00172"></a><a class="code" href="structscif__pll__opt__t.html#a4740e279139f74bfc8e5b0a03877afea">00172</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>   <a class="code" href="structscif__pll__opt__t.html#a4740e279139f74bfc8e5b0a03877afea" title="1 Disable the Wide-Bandith Mode (Wide-Bandwith mode allow a faster startup time and out-of-lock time)...">pll_wbwdisable</a>;
<a name="l00174"></a><a class="code" href="structscif__pll__opt__t.html#af1afe250ff51e752c3edf06da9f25aad">00174</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>   <a class="code" href="structscif__pll__opt__t.html#af1afe250ff51e752c3edf06da9f25aad" title="Divide the PLL output frequency by 2. (this settings does not change the FVCO value)">pll_div2</a>;
<a name="l00176"></a><a class="code" href="structscif__pll__opt__t.html#aae5047440f34de93ea589e39e4ce94da">00176</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>    <a class="code" href="structscif__pll__opt__t.html#aae5047440f34de93ea589e39e4ce94da" title="PLL MUL in the PLL formula.">mul</a>;
<a name="l00178"></a><a class="code" href="structscif__pll__opt__t.html#ac5f2397759d35572bfeeab93dda0c776">00178</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>    <a class="code" href="structscif__pll__opt__t.html#ac5f2397759d35572bfeeab93dda0c776" title="PLL DIV in the PLL formula.">div</a>;
<a name="l00180"></a><a class="code" href="structscif__pll__opt__t.html#a34359a906929e13a238b290925d1dff8">00180</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>    <a class="code" href="structscif__pll__opt__t.html#a34359a906929e13a238b290925d1dff8" title="PLL lockount.">lockcount</a>;                    
<a name="l00182"></a><a class="code" href="structscif__pll__opt__t.html#aee09a41840d5059cbb116689ea851d0f">00182</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>   <a class="code" href="structscif__pll__opt__t.html#aee09a41840d5059cbb116689ea851d0f" title="Specify the scillator input.">osc</a>;
<a name="l00183"></a>00183 } <a class="code" href="structscif__pll__opt__t.html" title="PLL0/PLL1 startup options.">scif_pll_opt_t</a>;
<a name="l00184"></a>00184 
<a name="l00186"></a><a class="code" href="structscif__osc32__opt__t.html">00186</a> <span class="keyword">typedef</span> <span class="keyword">struct</span>
<a name="l00187"></a>00187 {
<a name="l00189"></a><a class="code" href="structscif__osc32__opt__t.html#a9e4a17285bc2cc6741ae58d5821dfb75">00189</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span>   <a class="code" href="structscif__osc32__opt__t.html#a9e4a17285bc2cc6741ae58d5821dfb75" title="The input frequency (from the external clock or the crystal).">freq_hz</a>;
<a name="l00191"></a><a class="code" href="structscif__osc32__opt__t.html#a9c5abc962b1b136103403be646983e21">00191</a>   <a class="code" href="scif__uc3c_8h.html#a9a708e94c5df197717f5859f6b8b257c" title="The different oscillator modes.">scif_osc_mode_t</a> <a class="code" href="structscif__osc32__opt__t.html#a9c5abc962b1b136103403be646983e21" title="Set the oscillator mode.">mode</a>;
<a name="l00193"></a><a class="code" href="structscif__osc32__opt__t.html#af5305417f3897eb2e3b178485e99238f">00193</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>   <a class="code" href="structscif__osc32__opt__t.html#af5305417f3897eb2e3b178485e99238f" title="Specify the oscillator startup time.">startup</a>;
<a name="l00194"></a>00194 } <a class="code" href="structscif__osc32__opt__t.html" title="OSC32 startup options.">scif_osc32_opt_t</a>;
<a name="l00195"></a>00195 
<a name="l00196"></a>00196 
<a name="l00198"></a><a class="code" href="structscif__gclk__opt__t.html">00198</a> <span class="keyword">typedef</span> <span class="keyword">struct</span>
<a name="l00199"></a>00199 {
<a name="l00201"></a><a class="code" href="structscif__gclk__opt__t.html#a7f093e4c255de54d9ab438356372fdf1">00201</a>   <a class="code" href="scif__uc3c_8h.html#a2a2e11f06784f5133dd912e595fde6f0" title="The different clock source for the generic clocks.">scif_gcctrl_oscsel_t</a> <a class="code" href="structscif__gclk__opt__t.html#a7f093e4c255de54d9ab438356372fdf1" title="The input clock source to use for the generic clock.">clock_source</a>;
<a name="l00203"></a><a class="code" href="structscif__gclk__opt__t.html#ab737b01b420ea1a5df2fb2de4efe6b3e">00203</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="structscif__gclk__opt__t.html#ab737b01b420ea1a5df2fb2de4efe6b3e" title="The division factor to apply to the clock src.">divider</a>;
<a name="l00205"></a><a class="code" href="structscif__gclk__opt__t.html#a9f55e1a053f9b01014ba215e52e1f2d8">00205</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="structscif__gclk__opt__t.html#a9f55e1a053f9b01014ba215e52e1f2d8" title="Enable/disable the generic clock divisor.">diven</a>;
<a name="l00206"></a>00206 } <a class="code" href="structscif__gclk__opt__t.html" title="Generic clock generation settings.">scif_gclk_opt_t</a>;
<a name="l00207"></a>00207 
<a name="l00208"></a>00208 
<a name="l00210"></a><a class="code" href="scif__uc3c_8h.html#af06c6a1ecbab9e8c283124c594846dea">00210</a> <span class="preprocessor">#define SCIF_UNLOCK(reg)  (AVR32_SCIF.unlock = (AVR32_SCIF_UNLOCK_KEY_VALUE &lt;&lt; AVR32_SCIF_UNLOCK_KEY_OFFSET)|(reg))</span>
<a name="l00211"></a>00211 <span class="preprocessor"></span>
<a name="l00214"></a>00214 
<a name="l00215"></a>00215 
<a name="l00220"></a>00220 <span class="preprocessor"> #if defined (__GNUC__)</span>
<a name="l00221"></a>00221 <span class="preprocessor"></span>__attribute__((__always_inline__))
<a name="l00222"></a>00222 <span class="preprocessor">#endif</span>
<a name="l00223"></a>00223 <span class="preprocessor"></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> scif_enable_interrupts(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> mask)
<a name="l00224"></a>00224 {
<a name="l00225"></a>00225   AVR32_SCIF.ier = mask;
<a name="l00226"></a>00226 }
<a name="l00227"></a>00227 
<a name="l00232"></a>00232 <span class="preprocessor">#if defined (__GNUC__)</span>
<a name="l00233"></a>00233 <span class="preprocessor"></span>__attribute__((__always_inline__))
<a name="l00234"></a>00234 <span class="preprocessor">#endif</span>
<a name="l00235"></a>00235 <span class="preprocessor"></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> scif_disable_interrupts(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> mask)
<a name="l00236"></a>00236 {
<a name="l00237"></a>00237   AVR32_SCIF.idr = mask;
<a name="l00238"></a>00238 }
<a name="l00239"></a>00239 
<a name="l00244"></a>00244 <span class="preprocessor">#if defined (__GNUC__)</span>
<a name="l00245"></a>00245 <span class="preprocessor"></span>__attribute__((__always_inline__))
<a name="l00246"></a>00246 <span class="preprocessor">#endif</span>
<a name="l00247"></a>00247 <span class="preprocessor"></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> scif_get_enabled_interrupts(<span class="keywordtype">void</span>)
<a name="l00248"></a>00248 {
<a name="l00249"></a>00249   <span class="keywordflow">return</span>(AVR32_SCIF.imr);
<a name="l00250"></a>00250 }
<a name="l00251"></a>00251 
<a name="l00256"></a>00256 <span class="preprocessor">#if defined (__GNUC__)</span>
<a name="l00257"></a>00257 <span class="preprocessor"></span>__attribute__((__always_inline__))
<a name="l00258"></a>00258 <span class="preprocessor">#endif</span>
<a name="l00259"></a>00259 <span class="preprocessor"></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> scif_get_interrupts_status(<span class="keywordtype">void</span>)
<a name="l00260"></a>00260 {
<a name="l00261"></a>00261   <span class="keywordflow">return</span>(AVR32_SCIF.isr);
<a name="l00262"></a>00262 }
<a name="l00263"></a>00263 
<a name="l00268"></a>00268 <span class="preprocessor">#if defined (__GNUC__)</span>
<a name="l00269"></a>00269 <span class="preprocessor"></span>__attribute__((__always_inline__))
<a name="l00270"></a>00270 <span class="preprocessor">#endif</span>
<a name="l00271"></a>00271 <span class="preprocessor"></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> scif_clear_interrupts_status(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> mask)
<a name="l00272"></a>00272 {
<a name="l00273"></a>00273   AVR32_SCIF.icr = mask;
<a name="l00274"></a>00274 }
<a name="l00275"></a>00275 
<a name="l00277"></a>00277 
<a name="l00278"></a>00278 
<a name="l00281"></a>00281 
<a name="l00282"></a>00282 
<a name="l00287"></a>00287 <span class="preprocessor">#if defined (__GNUC__)</span>
<a name="l00288"></a>00288 <span class="preprocessor"></span>__attribute__((__always_inline__))
<a name="l00289"></a>00289 <span class="preprocessor">#endif</span>
<a name="l00290"></a>00290 <span class="preprocessor"></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> scif_get_pclk_status(<span class="keywordtype">void</span>)
<a name="l00291"></a>00291 {
<a name="l00292"></a>00292   <span class="keywordflow">return</span>(AVR32_SCIF.pclksr);
<a name="l00293"></a>00293 }
<a name="l00294"></a>00294 
<a name="l00296"></a>00296 
<a name="l00297"></a>00297 
<a name="l00300"></a>00300 
<a name="l00301"></a>00301 
<a name="l00315"></a>00315 <span class="keyword">extern</span> <span class="keywordtype">long</span> <span class="keywordtype">int</span> <a class="code" href="scif__uc3c_8c.html#a00ceb53ef51dd175ee30bc461155763b" title="Configure and start an OSC0/OSC1 oscillator.">scif_start_osc</a>(<a class="code" href="scif__uc3c_8h.html#af09989f8fb441a8d3806b7fe60fdc644" title="The different oscillators.">scif_osc_t</a> osc, <span class="keyword">const</span> <a class="code" href="structscif__osc__opt__t.html" title="OSC0/OSC1 startup options.">scif_osc_opt_t</a> *opt, <span class="keywordtype">bool</span> wait_for_ready);
<a name="l00316"></a>00316 
<a name="l00325"></a>00325 <span class="keyword">extern</span> <span class="keywordtype">bool</span> <a class="code" href="scif__uc3c_8c.html#a4d8aa2fd50f3bee4bd1b0f7cd9559f72" title="Is an oscillator stable and ready to be used as clock source?">scif_is_osc_ready</a>(<a class="code" href="scif__uc3c_8h.html#af09989f8fb441a8d3806b7fe60fdc644" title="The different oscillators.">scif_osc_t</a> osc);
<a name="l00326"></a>00326 
<a name="l00335"></a>00335 <span class="keyword">extern</span> <span class="keywordtype">long</span> <span class="keywordtype">int</span> <a class="code" href="scif__uc3c_8c.html#a5dca9b966cbe139223b6044b160509e5" title="Stop an oscillator.">scif_stop_osc</a>(<a class="code" href="scif__uc3c_8h.html#af09989f8fb441a8d3806b7fe60fdc644" title="The different oscillators.">scif_osc_t</a> osc);
<a name="l00336"></a>00336 
<a name="l00346"></a>00346 <span class="keyword">extern</span> <span class="keywordtype">long</span> <span class="keywordtype">int</span> <a class="code" href="scif__uc3c_8c.html#a07a99c5e193620b3d4a6825bcd054e37" title="Configure an oscillator in crystal mode.">scif_configure_osc_crystalmode</a>(<a class="code" href="scif__uc3c_8h.html#af09989f8fb441a8d3806b7fe60fdc644" title="The different oscillators.">scif_osc_t</a> osc, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> fcrystal);
<a name="l00347"></a>00347 
<a name="l00356"></a>00356 <span class="keyword">extern</span> <span class="keywordtype">long</span> <span class="keywordtype">int</span> <a class="code" href="scif__uc3c_8c.html#a4406d9a27fdfbedf364ff4b571fd9fa2" title="Configure an external clock as input clock.">scif_configure_osc_extmode</a>(<a class="code" href="scif__uc3c_8h.html#af09989f8fb441a8d3806b7fe60fdc644" title="The different oscillators.">scif_osc_t</a> osc);
<a name="l00357"></a>00357 
<a name="l00368"></a>00368 <span class="keyword">extern</span> <span class="keywordtype">long</span> <span class="keywordtype">int</span> <a class="code" href="scif__uc3c_8c.html#ae6a41bbff30ad3544abd620bb8b50612" title="Enable an oscillator with a given startup time.">scif_enable_osc</a>(<a class="code" href="scif__uc3c_8h.html#af09989f8fb441a8d3806b7fe60fdc644" title="The different oscillators.">scif_osc_t</a> osc, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> startup, <span class="keywordtype">bool</span> wait_for_ready);
<a name="l00369"></a>00369 
<a name="l00378"></a>00378 <span class="keyword">extern</span> <span class="keywordtype">long</span> <span class="keywordtype">int</span> <a class="code" href="scif__uc3c_8c.html#a78cb0ccfb114e27d63cc8fd317648def" title="Enable external clock.">scif_enable_extosc</a>(<a class="code" href="scif__uc3c_8h.html#af09989f8fb441a8d3806b7fe60fdc644" title="The different oscillators.">scif_osc_t</a> osc);
<a name="l00379"></a>00379 
<a name="l00381"></a>00381 
<a name="l00382"></a>00382 
<a name="l00385"></a>00385 
<a name="l00386"></a>00386 
<a name="l00395"></a>00395 <span class="keyword">extern</span> <span class="keywordtype">long</span> <span class="keywordtype">int</span> <a class="code" href="scif__uc3c_8c.html#a0762c326026298131479b2eb6c66966e" title="This function will setup a PLL.">scif_pll_setup</a>(<a class="code" href="scif__uc3c_8h.html#aee67e9247cde3191caf3a6ec8cc49131" title="The different plls.">scif_pll_t</a> pll, <span class="keyword">const</span> <a class="code" href="structscif__pll__opt__t.html" title="PLL0/PLL1 startup options.">scif_pll_opt_t</a> opt);
<a name="l00396"></a>00396 
<a name="l00404"></a>00404 <span class="keyword">extern</span> <span class="keywordtype">long</span> <span class="keywordtype">int</span> <a class="code" href="scif__uc3c_8c.html#afb379ef54174ea12680afe48a82c14b9" title="This function will enable a PLL.">scif_pll_enable</a>(<a class="code" href="scif__uc3c_8h.html#aee67e9247cde3191caf3a6ec8cc49131" title="The different plls.">scif_pll_t</a> pll);
<a name="l00405"></a>00405 
<a name="l00406"></a>00406 
<a name="l00414"></a>00414 <span class="keyword">extern</span> <span class="keywordtype">long</span> <span class="keywordtype">int</span> <a class="code" href="scif__uc3c_8c.html#a9fe5c285353fbea44393e996d603d257" title="This function will disable a PLL.">scif_pll_disable</a>(<a class="code" href="scif__uc3c_8h.html#aee67e9247cde3191caf3a6ec8cc49131" title="The different plls.">scif_pll_t</a> pll);
<a name="l00415"></a>00415 
<a name="l00416"></a>00416 
<a name="l00424"></a>00424 <span class="keyword">extern</span> <span class="keywordtype">long</span> <span class="keywordtype">int</span> <a class="code" href="scif__uc3c_8c.html#a8d9f1c5f02e409cac54b5e518eb6b717" title="This function will wait for PLL locked.">scif_wait_for_pll_locked</a>(<a class="code" href="scif__uc3c_8h.html#aee67e9247cde3191caf3a6ec8cc49131" title="The different plls.">scif_pll_t</a> pll);
<a name="l00425"></a>00425 
<a name="l00427"></a>00427 
<a name="l00430"></a>00430 
<a name="l00431"></a>00431 
<a name="l00444"></a>00444 <span class="keyword">extern</span> <span class="keywordtype">long</span> <span class="keywordtype">int</span> <a class="code" href="scif__uc3c_8c.html#a1a5d5f264ce6f288aa94fecbc8b24b10" title="Configure and start the OSC32 oscillator.">scif_start_osc32</a>(<span class="keyword">const</span> <a class="code" href="structscif__osc32__opt__t.html" title="OSC32 startup options.">scif_osc32_opt_t</a> *opt, <span class="keywordtype">bool</span> wait_for_ready);
<a name="l00445"></a>00445 
<a name="l00452"></a>00452 <span class="preprocessor">#if defined (__GNUC__)</span>
<a name="l00453"></a>00453 <span class="preprocessor"></span>__attribute__((__always_inline__))
<a name="l00454"></a>00454 <span class="preprocessor">#endif</span>
<a name="l00455"></a>00455 <span class="preprocessor"></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">bool</span> scif_is_osc32_ready(<span class="keywordtype">void</span>)
<a name="l00456"></a>00456 {
<a name="l00457"></a>00457   <span class="keywordflow">return</span>((AVR32_SCIF.pclksr &amp; AVR32_SCIF_PCLKSR_OSC32RDY_MASK)&gt;&gt;AVR32_SCIF_PCLKSR_OSC32RDY_OFFSET);
<a name="l00458"></a>00458 }
<a name="l00459"></a>00459 
<a name="l00460"></a>00460 
<a name="l00467"></a>00467 <span class="keyword">extern</span> <span class="keywordtype">long</span> <span class="keywordtype">int</span> <a class="code" href="scif__uc3c_8c.html#aacf9a41e2edc362e9dd0e90fe544cd14" title="Stop the OSC32 oscillator.">scif_stop_osc32</a>(<span class="keywordtype">void</span>);
<a name="l00468"></a>00468 
<a name="l00470"></a>00470 
<a name="l00471"></a>00471 
<a name="l00474"></a>00474 
<a name="l00475"></a>00475 
<a name="l00479"></a>00479 <span class="keyword">extern</span> <span class="keywordtype">void</span> <a class="code" href="scif__uc3c_8c.html#a180ec409dbfab40b802e883e43e7edba" title="Enables the 1.8V Brown-Out Detector interrupt.">scif_bod18_enable_irq</a>(<span class="keywordtype">void</span>);
<a name="l00480"></a>00480 
<a name="l00481"></a>00481 
<a name="l00485"></a>00485 <span class="keyword">extern</span> <span class="keywordtype">void</span> <a class="code" href="scif__uc3c_8c.html#a6855400b530bc304abe596e2aa6b7bc8" title="Disables the 1.8V Brown-Out Detector interrupt.">scif_bod18_disable_irq</a>(<span class="keywordtype">void</span>);
<a name="l00486"></a>00486 
<a name="l00487"></a>00487 
<a name="l00491"></a>00491 <span class="keyword">extern</span> <span class="keywordtype">void</span> <a class="code" href="scif__uc3c_8c.html#a32c4bf1084e3462837559441eb4f2455" title="Clears the 1.8V Brown-Out Detector interrupt flag.">scif_bod18_clear_irq</a>(<span class="keywordtype">void</span>);
<a name="l00492"></a>00492 
<a name="l00493"></a>00493 
<a name="l00500"></a>00500 <span class="keyword">extern</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <a class="code" href="scif__uc3c_8c.html#ad518d8685614797a31c212e961d8725f" title="Gets the 1.8V Brown-Out Detector interrupt flag.">scif_bod18_get_irq_status</a>(<span class="keywordtype">void</span>);
<a name="l00501"></a>00501 
<a name="l00502"></a>00502 
<a name="l00509"></a>00509 <span class="keyword">extern</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <a class="code" href="scif__uc3c_8c.html#aa9b3ed37bade8509a107e86916e18805" title="Gets the 1.8V Brown-Out Detector interrupt enable status.">scif_bod18_get_irq_enable_bit</a>(<span class="keywordtype">void</span>);
<a name="l00510"></a>00510 
<a name="l00511"></a>00511 
<a name="l00515"></a>00515 <span class="keyword">extern</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <a class="code" href="scif__uc3c_8c.html#ab9def9f54fbc0861e37b52f7ccd00d06" title="Gets the triggering threshold of the 1.8V Brown-Out Detector.">scif_bod18_get_level</a>(<span class="keywordtype">void</span>);
<a name="l00516"></a>00516 
<a name="l00517"></a>00517 
<a name="l00521"></a>00521 <span class="keyword">extern</span> <span class="keywordtype">void</span> <a class="code" href="scif__uc3c_8c.html#a41885a5f7da5d63fd6e6ed8e58608fe7" title="Enables the 3.3V Brown-Out Detector interrupt.">scif_bod33_enable_irq</a>(<span class="keywordtype">void</span>);
<a name="l00522"></a>00522 
<a name="l00523"></a>00523 
<a name="l00527"></a>00527 <span class="keyword">extern</span> <span class="keywordtype">void</span> <a class="code" href="scif__uc3c_8c.html#a41673b52a3fc9749f9ff34a3faa977ef" title="Disables the 3.3V Brown-Out Detector interrupt.">scif_bod33_disable_irq</a>(<span class="keywordtype">void</span>);
<a name="l00528"></a>00528 
<a name="l00529"></a>00529 
<a name="l00533"></a>00533 <span class="keyword">extern</span> <span class="keywordtype">void</span> <a class="code" href="scif__uc3c_8c.html#a72c758d2924ea2814d4bcfe1c122022f" title="Clears the 3.3V Brown-Out Detector interrupt flag.">scif_bod33_clear_irq</a>(<span class="keywordtype">void</span>);
<a name="l00534"></a>00534 
<a name="l00535"></a>00535 
<a name="l00542"></a>00542 <span class="keyword">extern</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <a class="code" href="scif__uc3c_8c.html#a651f36eaffe08306358f55b5f1880332" title="Gets the 3.3V Brown-Out Detector interrupt flag.">scif_bod33_get_irq_status</a>(<span class="keywordtype">void</span>);
<a name="l00543"></a>00543 
<a name="l00544"></a>00544 
<a name="l00551"></a>00551 <span class="keyword">extern</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <a class="code" href="scif__uc3c_8c.html#a35f2e5cca380e07e793b74f43cfd6149" title="Gets the 3.3V Brown-Out Detector interrupt enable status.">scif_bod33_get_irq_enable_bit</a>(<span class="keywordtype">void</span>);
<a name="l00552"></a>00552 
<a name="l00553"></a>00553 
<a name="l00557"></a>00557 <span class="keyword">extern</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <a class="code" href="scif__uc3c_8c.html#ab9960fafcbb182162fd5c1605b0c9b7b" title="Gets the triggering threshold of the 3.3V Brown-Out Detector.">scif_bod33_get_level</a>(<span class="keywordtype">void</span>);
<a name="l00558"></a>00558 
<a name="l00562"></a>00562 <span class="keyword">extern</span> <span class="keywordtype">void</span> <a class="code" href="scif__uc3c_8c.html#a2bb02cf9fc20b9e72ba0582727e0fcba" title="Enables the 5.0V Brown-Out Detector interrupt.">scif_bod50_enable_irq</a>(<span class="keywordtype">void</span>);
<a name="l00563"></a>00563 
<a name="l00564"></a>00564 
<a name="l00568"></a>00568 <span class="keyword">extern</span> <span class="keywordtype">void</span> <a class="code" href="scif__uc3c_8c.html#a4ebccdb22b97237b7a435403e7464969" title="Disables the 5.0V Brown-Out Detector interrupt.">scif_bod50_disable_irq</a>(<span class="keywordtype">void</span>);
<a name="l00569"></a>00569 
<a name="l00570"></a>00570 
<a name="l00574"></a>00574 <span class="keyword">extern</span> <span class="keywordtype">void</span> <a class="code" href="scif__uc3c_8c.html#a06a5914736539eec3f64773c3ab46244" title="Clears the 5.0V Brown-Out Detector interrupt flag.">scif_bod50_clear_irq</a>(<span class="keywordtype">void</span>);
<a name="l00575"></a>00575 
<a name="l00576"></a>00576 
<a name="l00583"></a>00583 <span class="keyword">extern</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <a class="code" href="scif__uc3c_8c.html#adadb46f98e9bdc8a8b8adbab790d4527" title="Gets the 5.0V Brown-Out Detector interrupt flag.">scif_bod50_get_irq_status</a>(<span class="keywordtype">void</span>);
<a name="l00584"></a>00584 
<a name="l00585"></a>00585 
<a name="l00592"></a>00592 <span class="keyword">extern</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <a class="code" href="scif__uc3c_8c.html#a9b98a43164cc8adce3ac426aa16324d5" title="Gets the 5.0V Brown-Out Detector interrupt enable status.">scif_bod50_get_irq_enable_bit</a>(<span class="keywordtype">void</span>);
<a name="l00593"></a>00593 
<a name="l00594"></a>00594 
<a name="l00598"></a>00598 <span class="keyword">extern</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <a class="code" href="scif__uc3c_8c.html#a06d74e1911e65c5549e6251b9da57f81" title="Gets the triggering threshold of the 5.0V Brown-Out Detector.">scif_bod50_get_level</a>(<span class="keywordtype">void</span>);
<a name="l00599"></a>00599 
<a name="l00601"></a>00601 
<a name="l00602"></a>00602 
<a name="l00605"></a>00605 
<a name="l00606"></a>00606 
<a name="l00607"></a>00607 
<a name="l00609"></a>00609 
<a name="l00612"></a>00612 
<a name="l00613"></a>00613 
<a name="l00616"></a>00616 <span class="keyword">extern</span> <span class="keywordtype">void</span> <a class="code" href="scif__uc3c_8c.html#a98d84a449826183d517302ad4bb6a013" title="Start the 8MHz internal RCosc (RC8M) clock.">scif_start_rc8M</a>(<span class="keywordtype">void</span>);
<a name="l00617"></a>00617 
<a name="l00620"></a>00620 <span class="keyword">extern</span> <span class="keywordtype">void</span> <a class="code" href="scif__uc3c_8c.html#ab2638cbe755096f6c9782a4248bef530" title="Stop the 8MHz internal RCosc (RC8M) clock.">scif_stop_rc8M</a>(<span class="keywordtype">void</span>);
<a name="l00621"></a>00621 
<a name="l00622"></a>00622 
<a name="l00625"></a>00625 
<a name="l00626"></a>00626 
<a name="l00629"></a>00629 <span class="keyword">extern</span> <span class="keywordtype">void</span> <a class="code" href="scif__uc3c_8c.html#a059e71c82dac925ae59dc36cdbf30222" title="Start the 120MHz internal RCosc (RC120M) clock.">scif_start_rc120M</a>(<span class="keywordtype">void</span>);
<a name="l00630"></a>00630 
<a name="l00633"></a>00633 <span class="keyword">extern</span> <span class="keywordtype">void</span> <a class="code" href="scif__uc3c_8c.html#a371afeca81ee2c2158e2c210f15440f9" title="Stop the 120MHz internal RCosc (RC120M) clock.">scif_stop_rc120M</a>(<span class="keywordtype">void</span>);
<a name="l00634"></a>00634 
<a name="l00636"></a>00636 
<a name="l00637"></a>00637 
<a name="l00640"></a>00640 
<a name="l00641"></a>00641 
<a name="l00651"></a>00651 <span class="keyword">extern</span> <span class="keywordtype">long</span> <span class="keywordtype">int</span> <a class="code" href="scif__uc3c_8c.html#a966f2ea463bfc21d1fbc8f5bd62365dd" title="Setup and start a generic clock.">scif_start_gclk</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> gclk, <span class="keyword">const</span> <a class="code" href="structscif__gclk__opt__t.html" title="Generic clock generation settings.">scif_gclk_opt_t</a> *opt);
<a name="l00652"></a>00652 
<a name="l00664"></a>00664 <span class="keyword">extern</span> <span class="keywordtype">long</span> <span class="keywordtype">int</span> <a class="code" href="scif__uc3c_8c.html#a703046a65be951d33d8907ca284d963a" title="Stop a generic clock.">scif_stop_gclk</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> gclk);
<a name="l00665"></a>00665 
<a name="l00680"></a>00680 <span class="keyword">extern</span> <span class="keywordtype">long</span> <span class="keywordtype">int</span> <a class="code" href="scif__uc3c_8c.html#ac355443257f05c78943fdd41d8b8fb90" title="Setup a generic clock.">scif_gc_setup</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> gclk, <a class="code" href="scif__uc3c_8h.html#a2a2e11f06784f5133dd912e595fde6f0" title="The different clock source for the generic clocks.">scif_gcctrl_oscsel_t</a> clk_src, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> diven, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> divfactor);
<a name="l00681"></a>00681 
<a name="l00690"></a>00690 <span class="keyword">extern</span> <span class="keywordtype">long</span> <span class="keywordtype">int</span> <a class="code" href="scif__uc3c_8c.html#a97cca4b2eb1d71d681f7b81f54e672c3" title="Enable a generic clock.">scif_gc_enable</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> gclk);
<a name="l00691"></a>00691 
<a name="l00693"></a>00693 
<a name="l00694"></a>00694 
<a name="l00697"></a>00697 
<a name="l00698"></a>00698 
<a name="l00704"></a>00704 <span class="keyword">extern</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <a class="code" href="scif__uc3c_8c.html#a5fcd05f3e28de6dae627d4d8bc1d73f5" title="Read the content of the SCIF GPLP registers.">scif_read_gplp</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> gplp);
<a name="l00705"></a>00705 
<a name="l00706"></a>00706 
<a name="l00712"></a>00712 <span class="keyword">extern</span> <span class="keywordtype">void</span> <a class="code" href="scif__uc3c_8c.html#ada5eb12275d8fb7f8040bfcd043e5cc3" title="Write into the SCIF GPLP registers.">scif_write_gplp</a>(<span class="keywordtype">int</span> gplp, <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> value);
<a name="l00713"></a>00713 
<a name="l00715"></a>00715 
<a name="l00716"></a>00716 
<a name="l00719"></a>00719 
<a name="l00720"></a>00720 
<a name="l00721"></a>00721 
<a name="l00728"></a>00728 <span class="preprocessor">#if defined (__GNUC__)</span>
<a name="l00729"></a>00729 <span class="preprocessor"></span>__attribute__((__always_inline__))
<a name="l00730"></a>00730 <span class="preprocessor">#endif</span>
<a name="l00731"></a>00731 <span class="preprocessor"></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> scif_temperature_sensor_enable(<span class="keywordtype">void</span>)
<a name="l00732"></a>00732 {
<a name="l00733"></a>00733   <span class="comment">// Unlock the write-protected TSENS register</span>
<a name="l00734"></a>00734   <a class="code" href="scif__uc3c_8h.html#af06c6a1ecbab9e8c283124c594846dea" title="Unlock SCIF register macro.">SCIF_UNLOCK</a>(AVR32_SCIF_TSENS);    
<a name="l00735"></a>00735   AVR32_SCIF.tsens = AVR32_SCIF_TSENS_EN_MASK;
<a name="l00736"></a>00736 }
<a name="l00737"></a>00737 
<a name="l00744"></a>00744 <span class="preprocessor">#if defined (__GNUC__)</span>
<a name="l00745"></a>00745 <span class="preprocessor"></span>__attribute__((__always_inline__))
<a name="l00746"></a>00746 <span class="preprocessor">#endif</span>
<a name="l00747"></a>00747 <span class="preprocessor"></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> scif_temperature_sensor_disable(<span class="keywordtype">void</span>)
<a name="l00748"></a>00748 {
<a name="l00749"></a>00749   <span class="comment">// Unlock the write-protected TSENS register</span>
<a name="l00750"></a>00750   <a class="code" href="scif__uc3c_8h.html#af06c6a1ecbab9e8c283124c594846dea" title="Unlock SCIF register macro.">SCIF_UNLOCK</a>(AVR32_SCIF_TSENS);    
<a name="l00751"></a>00751   AVR32_SCIF.tsens = ~AVR32_SCIF_TSENS_EN_MASK;
<a name="l00752"></a>00752 }
<a name="l00753"></a>00753 
<a name="l00755"></a>00755 
<a name="l00756"></a>00756 
<a name="l00757"></a>00757 <span class="preprocessor">#ifdef __cplusplus</span>
<a name="l00758"></a>00758 <span class="preprocessor"></span>}
<a name="l00759"></a>00759 <span class="preprocessor">#endif</span>
<a name="l00760"></a>00760 <span class="preprocessor"></span>
<a name="l00761"></a>00761 <span class="preprocessor">#endif  // _SCIF_UC3C_H_</span>
</pre></div></div>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>



<hr class="footer"/><address class="footer"><small>
Generated on Mon Dec 19 2011 21:04:51 for OpenShoe by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.5.1
</small></address>

</body>
</html>
